package cn.iocoder.yudao.module.member.enums;

import cn.hutool.core.util.EnumUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * 设备池类型枚举
 */
@Getter
@AllArgsConstructor
public enum PoolTypeEnum {
    /**
     * 设备池类型
     */
    PUBLIC_POOL(0, "公共池"),
    PRIVATE_POOL(1,"独立池"),
    ;

    /**
     * 业务类型
     */
    private final int type;
    /**
     * 标题
     */
    private final String title;



    public static PoolTypeEnum getByType(Integer type) {
        return EnumUtil.getBy(PoolTypeEnum.class,
                e -> Objects.equals(type, e.getType()));
    }
}
